<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
</h:head>
<h:body style="background:#2A2D30">
        
 <h:form id="form">
 	<p:panel header="Personalizaion Page" style="height:800pxpx">
			
			<h:panelGrid columns="1" id="regGrid">
			
				<h:outputLabel for="destination">DESTINATION:</h:outputLabel>
				 <p:selectOneMenu id="destination" value="#{personpkbean.persondto.pDestination}">
                    <f:selectItem itemLabel="#{standardpkbean.city}" itemValue="#{standardpkbean.city}" />  
                  </p:selectOneMenu>
				
					<br/>
					<h:outputLabel for="departure">FROM:</h:outputLabel>
					 <p:selectOneMenu id="Depurture" value="#{personpkbean.persondto.pDeparture}">
                    <f:selectItem itemLabel="Select Your City" itemValue="" />
                    <f:selectItem itemLabel="Milan" itemValue="Milan" />  
                    <f:selectItem itemLabel="Bolgnia" itemValue="Bolgnia" />                   
                     <f:selectItem itemLabel="Florence" itemValue="Florence" />  
                     <f:selectItem itemLabel="Rome" itemValue="Rome" />  
                     <f:selectItem itemLabel="Pissa" itemValue="Pissa" />  
                     <f:selectItem itemLabel="Venic" itemValue="Pissa" />  
                 </p:selectOneMenu>
                 <p:separator/>
				<h:outputLabel for="email">Email:</h:outputLabel>
				<p:inputText id="email" value="#{personpkbean.persondto.pUsername}"  />
				<p:message for="email" />
     
				<h:outputLabel for="firstName">First name:</h:outputLabel>
				<p:inputText id="firstName" value="#{personpkbean.persondto.pFName}" />
				<p:message for="firstName" />

				<h:outputLabel for="lastName">Last name:</h:outputLabel>
				<p:inputText id="lastName" value="#{personpkbean.persondto.pLName}" />
				<p:message for="lastName" />

				<h:outputLabel for="numberofdays">Nummber of days:</h:outputLabel>
				 <p:selectOneMenu id="Nofdays" value="#{personpkbean.persondto.pNofdays}">
                    <f:selectItem itemLabel="Select Number Of Days" itemValue="" />
                    <f:selectItem itemLabel="3 days" itemValue="3" />  
                    <f:selectItem itemLabel="4 days" itemValue="4" />  
                 </p:selectOneMenu>

                 <h:outputLabel for="hotel">Hotels:</h:outputLabel>
				 <p:selectOneMenu id="hotel" value="#{personpkbean.persondto.pHotel}">
                    <f:selectItem itemLabel="Select Hotel" itemValue="" />
                    <f:selectItem itemLabel="Best Western Hotel-4Star" itemValue="BestW" />  
                    <f:selectItem itemLabel="Hotel Hilton -3Star" itemValue="Hilton" />  
                 </p:selectOneMenu>
                
                 <h:outputLabel for="flight">Flight:</h:outputLabel>
				 <p:selectOneMenu id="flight" value="#{personpkbean.persondto.pFlight}">
                    <f:selectItem itemLabel="Select AirLine" itemValue="" />
                    <f:selectItem itemLabel="EasyJet" itemValue="EasyJet" />  
                    <f:selectItem itemLabel="RyanAir" itemValue="Hilton" />  
                    <f:selectItem itemLabel="AirItaly" itemValue="AirItaly" />  
                  </p:selectOneMenu>
                   <p:calendar value="#{personpkbean.persondto.pStartdate}" id="popupCal" />  
         <br/>         
                  <p:selectOneMenu id="Excursion" value="#{personpkbean.persondto.pExcursion}">
                    <f:selectItem itemLabel="Select Excursion" itemValue="" />
                    <f:selectItem itemLabel="City Tour" itemValue="City Tour" />  
                    <f:selectItem itemLabel="Shopping Tour" itemValue="shop" />  
                  </p:selectOneMenu>
		<br/>		
			
			
			<p:commandButton id="personpk" value="Book!" update="regGrid"
				action="#{personpkbean.register()}" title="Complete" oncomplete="PF('successDialog').show()" />
            </h:panelGrid>
                     
   </p:panel>
    
   <p:dialog header="Book!" widgetVar="successDialog" resizable="false"
                        id="successDlg" showEffect="fade" hideEffect="drop" modal="true"
                        draggable="no">

          <h:outputText rendered="#{(not empty personpkbean.persondto.pUsername)}" value="Please fill all field" />

           <p:panel rendered="#{(empty personpkbean.persondto.pUsername)}">
                    <h:panelGrid columns="3">
                              <h:outputText value="Dear"/>
                               <h:outputText value="#{asghar.name}" />
                               <h:outputText value="Your Package is BooKing is done!" />
                     </h:panelGrid>
           </p:panel>
                       
                        <h:form>
                                <br />
                                <p:button value="Book Another Package!"
                                        outcome="index.xhtml" />
                                <p:button value="back to profile" outcome="profile.xhtml" />
                        </h:form>
                </p:dialog>
                
    </h:form>
    <br/>      <p:panel>
		     	  <p:commandButton action="#{logoutBean.logout}" value="Logout" />
	    		</p:panel> 
 
</h:body>
</html>




          